package cn.swh.guguanjia.service.impl;

import cn.swh.guguanjia.entity.Demand;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import cn.swh.guguanjia.service.DemandService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class DemandServicelmpl extends BaseServicelmpl<Demand, Long> implements DemandService {

    @Override
    public PageInfo<Demand> demandSelectPage(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        Demand demand = new Demand();
        List<Demand> select = mapper.select(demand);
        PageInfo<Demand> demandPageInfo = new PageInfo<>(select);
        return demandPageInfo;

    }
}
